package controller;


import java.util.logging.Level;
import java.util.logging.Logger;

import persistence.DataManager;
import view.View;

import model.Model;


public class Main {

	
    /**
     * @param args
     */
    public static void main(String[] args) {
 
        Model m = new Model();
       
        try {
        	DataManager dm = new DataManager("jdbc:mysql://localhost/bddlibrarymanager", "root", "", m);
        	
        	dm.load();
        	
        	dm.displayVerifDataManager();
        	
        	
        	View v = new View(m);
            
            Controller c = new Controller(v, dm);

		} catch (Exception e) {
			Logger log = Logger.getLogger(Controller.class.getName());
			log.log(Level.SEVERE, "an exception was thrown", e);
		}
       
	    //JUnit test : http://www.vogella.com/articles/JUnit/article.html
    }
    
}
